package com.pd.backend.service.impl;

import com.pd.backend.mapper.PdTruckTypeMapper;
import com.pd.backend.pojo.PdTruckType;
import com.pd.backend.service.PdTruckTypeService;
import com.pd.backend.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * 车辆类型业务实现
 */
@Service
@Transactional
@Slf4j
public class PdTruckTypeServiceImpl implements PdTruckTypeService {
    @Autowired
    private PdTruckTypeMapper pdTruckTypeMapper;
    /**
     * 查询全部车辆类型
     * @return
     */
    @Override
    public ResponseResult<List<PdTruckType>> selectAllTruckType() {
        List<PdTruckType> list= pdTruckTypeMapper.selectAllTruckType();
        return ResponseResult.okResult(list);
    }
}